home *** CD-ROM | disk | FTP | other *** search
- #
- # gulam script for testing gperf
- #
- echo "performing some tests of the perfect hash generator"
- gcc -v -c -O test.c
- ..\gperf -p -c -l -S1 -C -o c.gpf >cinset.c
- gcc -v -O -o cout cinset.c test.o
- echo "testing ANSI C reserved words, all items should be found in the set"
- .\cout -v <c.gpf >output.c
- diff -c -b expc output.c
- ..\gperf '-k1,4,$' ada.gpf >adainset.c
- gcc -v -O -o aout adainset.c test.o
- echo "testing Ada reserved words,all items should be found in the set"
- .\aout -v <ada.gpf >outares
- diff -c -b expares outares
- ..\gperf -p -D '-k1,$' -s 2 -o adadefs.gpf >preinset.c
- gcc -v -O -o preout preinset.c test.o
- echo "testing Ada predefined words, all items should be found in the set"
- .\preout -v <adadefs.gpf >outapred
- diff -c -b expapred outapred
- ..\gperf '-k1,2,$' -o modula3.gpf >m3inset.c
- gcc -v -O -o m3out m3inset.c test.o
- echo "testing Modula3 reserved words, all items should be found in the set"
- .\m3out -v <modula3.gpf >outmod
- diff -c -b expmod outmod
- ..\gperf -o -S2 -p <pascal.gpf >pinset.c
- gcc -v -O -o pout pinset.c test.o
- echo "testing Pascal reserved words, all items should be found in the set"
- .\pout -v <pascal.gpf >outpas
- diff -c -b exppas outpas
- ..\gperf -p -j1 -g -o -t -N is_reserved_word '-k1,3,$' c-parse.gpf >testout.1
- diff -c -b expout.1 testout.1
- ..\gperf -n -k1-8 -l modula2.gpf >testout.2
- diff -c -b expout.2 testout.2
- ..\gperf -p -j 1 -o -a -g -t '-k1,4,$' gplus.gpf >testout.3
- diff -c -b expout.3 testout.3
- ..\gperf -D -p -t <c-parse.gpf >testout.4
- diff -c -b expout.4 testout.4
- ..\gperf -g -o -j1 -t -p -N is_reserved_word gpc.gpf >testout.5
- diff -c -b expout.5 testout.5
- ..\gperf -h >testout.6 2>&1
- diff -c -b expout.6 testout.6
- echo "only if, do, for, case, goto, else, while, and return should be found "
- .\aout -v <c.gpf >testout.7
- diff -c -b expout.7 testout.7
-